<template>
 <h2>注册</h2>
 <table>
    <tr>
        <td>账号</td>
        <td><input type="text" placeholder="请输入账号" v-model="info.Lname"></td>
    </tr>
    <tr>
        <td>密码</td>
        <td><input type="password" placeholder="请输入密码" v-model="info.Lpwd"></td>
    </tr>
    <tr>
        <td>
            <input type="button" value="注册" @click="zhuche" >
        </td>
        <td></td>
    </tr>
 </table>
</template>

<script setup lang="ts">

import axios from 'axions';

import { ref } from 'vue'

const info=ref({
    Lname:"",
    Lpwd:""
})

const zhuche = () => {
   if(info.value.Lname==""){
       alert("账号不能为空");
       return;
   }
   if(info.value.Lpwd==""){
       alert("密码不能为空");
       return;
   }
   if(info.value.Lpwd.length<6){
       alert("密码不能小于6位");
       return;
   }
   axios.post("",{
    Lname:info.value.Lname,
    Lpwd:info.value.Lpwd,
   })


</script>

<style scoped>

</style>